﻿using COUP.Core.Entities;

namespace COUP.Core.Networking
{
    public class CharacterPacket : Packet
    {
        public CharacterPacket(Character Entity)
        {
            Length = (ushort)(66 + Entity.Name.Length + Entity.Spouse.Length);
            Type = 1006;
            Int(Entity.UniqueID);
            Int(Entity.Model);
            Short(Entity.Hair);
            Int(Entity.InventoryGold, 16);
            Int(Entity.Experience);
            Short(Entity.Strength, 40);
            Short(Entity.Agility);
            Short(Entity.Vitality);
            Short(Entity.Spirit);
            Short(Entity.Stats);
            Short(Entity.Health);
            Short(Entity.Mana);
            Short(Entity.PkPoints);
            Byte(Entity.Level);
            Byte(Entity.Job);
            Byte((byte)Entity.Reborn, 59);
            Byte(Entity.ShowNames);
            Byte(2);
            StringWithLength(Entity.Name);
            StringWithLength(Entity.Spouse);
        }
    }
}
